//
//  UIHelper.h
//  YueMi
//
//  Created by Rainbow on 4/29/11.
//  Copyright 2011 iTotemStudio. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface UIHelper : NSObject {
    
}


+ (UIView *)addMaskToView:(UIView *)view alpha:(CGFloat)alpha;
+ (void)removeMaskForView:(UIView *)view;
+ (UIView *)newMaskViewForView:(UIView *)view alpha:(CGFloat)alpha;
+ (void)showGlobalMaskWithShadow:(BOOL)hasShadow;
+ (void)hideGlobalMask;

+ (UIImage *)newHalfImage:(UIImage *)image side:(NSInteger)kHalfImage;
+ (CGSize)getScaledImageSize:(CGSize)imgSize frameSize:(CGSize)frameSize;
+ (NSInteger)getImageTypeWithSize:(CGSize)imgSize;

+ (void)addAnimationShow:(UIView *)viewToAddAnimation;
+ (void)addAnimationHalfShow:(UIView *)viewToAddAnimation;
+ (void)addAnimationFade:(UIView *)viewToAddAnimation;
+ (void)addAnimationClick:(UIView *)viewToAddAnimation;
+ (void)addAnimationSlideUp:(UIView *)viewToAddAnimation;
+ (void)addAnimationSlideDown:(UIView *)viewToAddAnimation;
+ (void)addAnimationSlideLeft:(UIView *)viewToAddAnimation;
+ (void)addAnimationSlideRight:(UIView *)viewToAddAnimation;

+ (UIButton *)newTextButtonWithFrame:(CGRect)frame
							   title:(NSString *)title 
						  titleColor:(UIColor *)titleColor
						 tappedColor:(UIColor *)tappedColor
								font:(UIFont *)font
							  target:(id)target 
							  action:(SEL)selector;

+ (UIButton *)newImageButtonWithFrame:(CGRect)frame
								image:(UIImage *)image
						  tappedImage:(UIImage *)tappedImage
							   target:(id)target 
							   action:(SEL)selector;

+ (UIButton *)newActionButtonWithFrame:(CGRect)frame
								 title:(NSString *)title 
							titleColor:(UIColor *)titleColor
						   tappedColor:(UIColor *)tappedColor
								  font:(UIFont *)font
								target:(id)target 
								action:(SEL)selector;

+ (UILabel *)newLabelWithFrame:(CGRect)frame
						  text:(NSString *)text
					 textColor:(UIColor *)textColor
						  font:(UIFont *)font;

+ (void)showMsgAlertWithTitle:(NSString *)title message:(NSString *)msg;
+ (void)showProcessIndicatorWithView:(UIView *)view atPoint:(CGPoint)point hasMask:(BOOL)hasMask style:(UIActivityIndicatorViewStyle)style;
+ (void)showProcessIndicatorWithView:(UIView *)view atPoint:(CGPoint)point hasMask:(BOOL)hasMask;
+ (void)hideProcessIndicatorWithView:(UIView *)view;
+ (void)roundCenter:(UIView *)view;
+ (void)removeSubviews:(UIView *)theView;
+ (UIImage*)getImage:(UIImage*)pImage width:(float)width height:(float)heigth;
+ (UIImage*)getImage:(UIImage *)pImage scale:(float)scale;
@end
